<script setup>
import { ref, reactive } from 'vue'
import { addLoopData } from '../../api/loop'
const form = reactive({
    url: '',
    alt: ''
})
function addData() {
    addLoopData(form)
        .then((res) => {
            console.log(res);
        })
}
</script>
<template>
    <el-form :model="form">
        <el-form-item label="图片地址">
            <el-input v-model="form.url" />
        </el-form-item>
        <el-form-item label="描述">
            <el-input v-model="form.alt" />
        </el-form-item>
    </el-form>
    <el-button @click="addData()">添加</el-button>
</template>
<style scoped>
img {
    width: 100px;
    height: 100px;
}
</style>